package com.ruoyi.qualityManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qualityManagement.mapper.InboundInspectionMapper;
import com.ruoyi.qualityManagement.domain.InboundInspection;
import com.ruoyi.qualityManagement.service.IInboundInspectionService;

/**
 * 入库检管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-05
 */
@Service
public class InboundInspectionServiceImpl implements IInboundInspectionService 
{
    @Autowired
    private InboundInspectionMapper inboundInspectionMapper;

    /**
     * 查询入库检管理
     * 
     * @param inspectionId 入库检管理主键
     * @return 入库检管理
     */
    @Override
    public InboundInspection selectInboundInspectionByInspectionId(Long inspectionId)
    {
        return inboundInspectionMapper.selectInboundInspectionByInspectionId(inspectionId);
    }

    /**
     * 查询入库检管理列表
     * 
     * @param inboundInspection 入库检管理
     * @return 入库检管理
     */
    @Override
    public List<InboundInspection> selectInboundInspectionList(InboundInspection inboundInspection)
    {
        return inboundInspectionMapper.selectInboundInspectionList(inboundInspection);
    }

    /**
     * 新增入库检管理
     * 
     * @param inboundInspection 入库检管理
     * @return 结果
     */
    @Override
    public int insertInboundInspection(InboundInspection inboundInspection)
    {
        inboundInspection.setCreateTime(DateUtils.getNowDate());
        return inboundInspectionMapper.insertInboundInspection(inboundInspection);
    }

    /**
     * 修改入库检管理
     * 
     * @param inboundInspection 入库检管理
     * @return 结果
     */
    @Override
    public int updateInboundInspection(InboundInspection inboundInspection)
    {
        inboundInspection.setUpdateTime(DateUtils.getNowDate());
        return inboundInspectionMapper.updateInboundInspection(inboundInspection);
    }

    /**
     * 批量删除入库检管理
     * 
     * @param inspectionIds 需要删除的入库检管理主键
     * @return 结果
     */
    @Override
    public int deleteInboundInspectionByInspectionIds(Long[] inspectionIds)
    {
        return inboundInspectionMapper.deleteInboundInspectionByInspectionIds(inspectionIds);
    }

    /**
     * 删除入库检管理信息
     * 
     * @param inspectionId 入库检管理主键
     * @return 结果
     */
    @Override
    public int deleteInboundInspectionByInspectionId(Long inspectionId)
    {
        return inboundInspectionMapper.deleteInboundInspectionByInspectionId(inspectionId);
    }
}
